package org.merger.factory;

import org.merger.domain.ProductRepository;


public class ProductRepositoryFactory {
	
	private ProductRepository productRepository;
	
	public void setProductRepository(ProductRepository productRepository) {
		this.productRepository = productRepository;
	}
	private static ProductRepositoryFactory instance;
	
	public static ProductRepositoryFactory getInstance() {
		if(instance == null) instance = new ProductRepositoryFactory();
		return instance;
	}
	public ProductRepository getProductRepository () {
		if(productRepository == null) productRepository = new ProductRepository();
		return productRepository;
	}
	
}
